      
ALTER PROCEDURE [dbo].[spLoginUser]-- 'bookie2ball2ball','b2b1','b2b2'             
 -- Add the parameters for the stored procedure here              
 @UserName varchar(100),              
 @Password varchar(100),
 @Password2 Varchar(100)              
AS              
BEGIN              
 -- SET NOCOUNT ON added to prevent extra result sets from              
 -- interfering with SELECT statements.              
 SET NOCOUNT ON;              
              
    -- Insert statements for procedure here              
 select [Admin].Id, Admin.UserType,   
   (Admin.FirstName + ' ' +Admin.LastName) as 'FullName',              
   AdminCredential.BatId,AdminCredential.Username,AdminCredential.Password1,AdminCredential.Password2
 from [Admin]                
 inner join AdminCredential on Admin.Id = [AdminCredential].AdminId
 
where [AdminCredential].UserName = @UserName And ([AdminCredential].Password1  COLLATE Latin1_General_CS_AS = @Password) and 
([AdminCredential].Password2  COLLATE Latin1_General_CS_AS = @Password2) AND Admin.IsActive=1
AND Admin.IsDeleted = 0       
END 


